local inlay_hints = {
    enumMemberValues = { enabled = true },
    functionLikeReturnTypes = { enabled = true },
    parameterNames = { enabled = "literals" },
    parameterTypes = { enabled = true },
    propertyDeclarationTypes = { enabled = true },
    variableTypes = { enabled = false },
}

local settings = {
    updateImportsOnFileMove = { enabled = "always" },
    suggest = { completeFunctionCalls = true },
    inlayHints = inlay_hints,
}

return {
    cmd = { "vtsls" },

    root_markers = { "tsconfig.json", "package.json", "vite.config.js", "vite.config.ts", "jsconfig.json", ".git" },
    filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },

    settings = {
        complete_function_calls = true,
        vtsls = {
            enableMoveToFileCodeAction = true,
            autoUseWorkspaceTsdk = true,
            experimental = {
                maxInlayHintLength = 30,
                completion = { enableServerSideFuzzyMatch = true },
            },
        },
        typescript = settings,
        javascript = settings,
    },
    single_file_support = true,
    init_options = {
        vue = {
            hybridMode = false,
        },
    },
    languageFeatures = {
        implementation = true,
        references = true,
        definition = true,
        typeDefinition = true,
        callHierarchy = true,
        hover = true,
        rename = true,
        renameFileRefactoring = true,
        signatureHelp = true,
        codeAction = true,
        workspaceSymbol = true,
        diagnostics = true,
        semanticTokens = false,
    },
}
